home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Linux Cubed Series 8: LINUX Games
/
Linux Cubed Series 8 - LINUX Games.iso
/
games
/
x11
/
rpg
/
crossfir.001
/
crossfir~
/
eutl
/
chain-hash
/
test1.c
< prev
Wrap
C/C++ Source or Header
|
1994-09-19
|
482b
|
25 lines
#include <stdio.h>
#include <chain-hash.h>
#include <xfile.h>
#define DICT "/usr/dict/words"
int main(int argc,char *argv[])
{
FILE *dict;
char buf[200],*check;
HashTable tbl;
dict = xfopen(DICT,"r");
tbl = CreateHashTable(-20000,NULL);
while(fgets(buf,200,dict)!=NULL) {
SHashInsert(tbl,buf,buf,strlen(buf)+1);
check = SHashLookup(tbl,buf);
if (strcmp(check,buf)) {
fprintf(stderr,"Inconsistancy on %s",buf);
abort();
}
}
return 0;
}